package com.ruicar.afs.cloud.channel.common.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.channel.common.dto.BlackDTO;
import com.ruicar.afs.cloud.channel.common.dto.BlackToListDTO;
import com.ruicar.afs.cloud.channel.common.dto.CarAllListDTO;
import com.ruicar.afs.cloud.channel.common.dto.CarToListDTO;
import com.ruicar.afs.cloud.common.core.feign.annotations.AfsFeignClear;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 名单库
 */
@FeignClient(name = "namelist", url = "${com.greatwall.systems.namelist-system.url}")
public interface ListBaseFeign {

    @ApiOperation("获取名单库列表")
    @PostMapping(value = "/blackList/list")
    @AfsFeignClear(true)
    JSONObject getBlackList(@RequestBody BlackDTO dto);

    @ApiOperation("到名单库添加修改黑名单")
    @PostMapping(value = "/blackList/add")
    @AfsFeignClear(true)
    JSONObject upBlackList(@RequestBody BlackToListDTO dto);

    @ApiOperation("到名单库查询挂牌车")
    @PostMapping(value = "/select")
    @AfsFeignClear(true)
    JSONObject carListingSelecte(@RequestBody CarAllListDTO dto);

    @ApiOperation("到名单库添加挂牌车")
    @PostMapping(value = "/save")
    @AfsFeignClear(true)
    JSONObject carListingSave(@RequestBody CarToListDTO dto);

    @ApiOperation("到名单库修改挂牌车")
    @PostMapping(value = "/update")
    @AfsFeignClear(true)
    JSONObject carListingUpdate(@RequestBody CarToListDTO dto);

}
